package com.jtcoding.chat.dao.fastdfs;

import com.jtcoding.chat.model.ResourceFromService;
import com.jtcoding.chat.model.ResourceLog;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author jason.tang
 * @create 2019-01-25 15:37
 * @description 资源DAO
 */
@Mapper
public interface ResourceDao {

    int addResourceLog(ResourceLog resourceLog);

    ResourceFromService getResourceFromService(String fromService);

    List<ResourceLog> getResourceLogByRefNum(@Param("resType") String resType, @Param("refNum") Integer refNum);

    void updateResourceLog(ResourceLog... resourceLogs);

    List<ResourceLog> getHistoryResource(@Param("refNum") Integer refNum, @Param("resType") String resType);

    int deleteResource(@Param("groupName") String groupName, @Param("remoteFileName") String remoteFileName);
}
